<template>
	<view>
		<view class="proSwiper">
			<swiper class="swipers posAbso ltzero defBg" :indicator-dots="dotsFlag" indicator-color="rgba(255,255,255,.3)" indicator-active-color="#ffffff" :autoplay="autoplayFlag" :circular="circularFlag">
				<swiper-item class="swiper-item"
					v-for="(item,index) in albumList"
					:key="index"
					@tap="previewImage(index)"
				>	
					<image class="samePar" :src="item" mode="aspectFill"></image>
				</swiper-item>
			</swiper>
		</view>
		<view class="profileWrap">
			<view class="profile">
				<view class="fileTit">机构名称</view>
				<view class="fileCon" v-if="list.ogzName != undefined">{{(list.ogzName)}}</view>
			</view>
			<view class="profile">
				<view class="fileTit">机构联系人</view>
				<view class="fileCon">
					<text class="tills">{{list.lxName}}</text>
					<text class="till">|</text>
					<text>{{list.lxTel}}</text>
				</view>
			</view>
			<view class="profile">
				<view class="fileTit">工作时间</view>
				<view class="fileCon">
					<text class="tills">{{list.workTime}}</text>
				</view>
			</view>
			<view class="profile">
				<view class="fileTit">服务领域</view>
				<view class="fileCon clearfix">
					<view class="tagItem"
						v-for="(item,index) in fwRangeArr"
						:key="index"
					>{{item}}</view>
				</view>
			</view>
			<view class="profile posRel">
				<view class="fileTit">机构地址</view>
				<view class="fileCon spec">{{list.address}}</view>
			</view>
			<view class="profile posRel">
				<view class="fileTit">机构介绍</view>
				<view class="fileCon">{{list.ogzProfile}}</view>
			</view>
			<view class="groupService">
				<image class="samePar" src="../../../../static/images/ogz/ogzTt.png" @tap="goGroupService"></image>
			</view>
		</view>
		<view class="botCon">
			<view class="botConLeft" @tap="makePhoneCall(list.lxTel)">
				<view class="t-icon t-icon-dianhua"></view>
				<view class="favorTxt">电话</view>
			</view>
			<view class="botConRight">
				<view class="focus" v-if="list.gzTag == 0" @tap="goFocus"><text class="iconfont icon-jia"></text>关注</view>
				<view class="focus" v-if="list.gzTag == 1" @tap="goFocus"><text class="iconfont icon-duihao"></text>已关注</view>
				<view class="yyBtn" @tap="makePhoneCall(list.lxTel)">电话咨询</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			albumList:Array,
			list:Object,
			fwRangeArr:Array
		},
		data(){
			return{
				dotsFlag:true,
				autoplayFlag:true,
				circularFlag:true,
			}
		},
		methods:{
			goFocus(){
				this.$emit('goFocus')
			},
			makePhoneCall(phoneNum){ 
				this.$emit('makePhoneCall',phoneNum)
			},
			goGroupService(){
				this.$emit('goGroupService')
			},
			goCurrPos(){
				this.$emit('goCurrPos')
			},
			previewImage(index){
				this.$emit('previewImage',index);
			}
		}
	}
</script>
<style>
	@import url("/static/css/common/icon-svg.css");
	.t-icon{
		width: 38rpx;
		height: 38rpx;
	}
</style>
<style lang='scss' scoped>
	@import '@/static/scss/zxsDetBotBtn.scss';
	.proSwiper{
		width: 100%;
		height: 400rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		position: relative;
	}
	.proSwiper .swipers{
		width: 100%;
		height: 100%;
	}
	.proSwiper .swipers .swiper-item{
		border-radius: $pss-border-radius6;
	}
	.tagItem{
		height: 40rpx;
		line-height: 40rpx;
		padding: 0 15rpx;
		border-radius: 8rpx; 
		background: #fff7ea;
		color: $pss-color-primary_1;
		font-size: $font-size26;
		float: left;
		margin-right: 15rpx;
	}
	.groupService{
		width: 690rpx;
		height: 136rpx;
		margin-top: 30rpx;
	}
	.profileWrap{
		padding:0 30rpx 120rpx;
	}
	.profile{
		border-bottom: 1rpx solid #eee;
		padding:10rpx 0 20rpx;
		.fileTit{
			height: 60rpx;
			line-height: 60rpx;
			font-size: $font-size28;
			color: $pss-text-color3;
		}
		.fileCon{
			font-size: $font-size26;
			color: $pss-text-color8;
			.tills{
				margin-left: 10rpx;
			}
			.till{
				margin: 0 10rpx;
			}
			&.spec{
				width: 90%;
			}
		}
		.iconWrap{
			width: 50rpx;
			height: 50rpx;
			line-height: 50rpx;
			background: #e5faf5;
			border-radius: 50%;
			text-align: center;
			position: absolute;
			right: 0;
			top: 60rpx;
			.icon-daohang{
				color: $pss-color-green;
				font-size: $font-size30;
			}
		}
	}
	
</style>